package Thread.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author 23050
 * @version 1.0
 * @description: TODO
 * @date 2024/3/2 17:28
 */
public class MyExecutors implements Runnable {

    @Override
    public void run() {
        System.out.println("MyRunnable...run...");
    }

    public static void main(String[] args) {
        //创建线程池对象
        ExecutorService threadPool = Executors.newFixedThreadPool(3);
        threadPool.submit(new MyExecutors());

        //关闭线程池
        threadPool.shutdown();
    }
}
